<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('档位奖励列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "bounty/bounty";
    $(function() {
        var options = {
            url: prefix + "/list",
            modalName: "档位奖励列表",
            clickToSelect:true,
            sortName: 'id',
            sortOrder : 'asc',
            columns: [{
                radio: true
            },
            {
                field: 'id',
                title: '序号',
                visible: false
            },
            {
                field: 'numbers',
                title: '首次购机数量'
            },
            {
                field: 'sumMoney',
                title: '引流奖励'
            },
            {
                field: 'bountyMonthShow',
                title: '奖励期限（显示）'
            },
            {
                field: 'bountyMonthHide',
                title: '奖励期限（隐藏）'
            }]
        };
        $.table.init(options);
    });

    /* 添加用户-选择用户-提交 */
    function submitHandler(index, layero) {
        var rows = $.table.selectFirstColumns();
        if (rows.length == 0) {
            $.modal.alertWarning("请选择一条记录");
            return;
        }
        $.modal.close();
        // 父页面的变量
        parent.$('#special_grade_id').val($.table.selectColumns("id"));
        parent.$('#sumMoney').val($.table.selectColumns("sumMoney"));


    }
</script>
</body>
</html>